mx, my, hx, hy = map(int, input().split())
dp = []
for i in range(mx + 5):
    dp.append([])
    for _ in range(my + 5):
        dp[i].append(0)

for i in range(2, mx + 3):
    for j in range(2, my + 3):
        dp[i][j] = 1
dp[hx + 2][hy + 2] = 0
dp[hx][hy + 1] = 0
dp[hx + 4][hy + 1] = 0
dp[hx][hy + 3] = 0
dp[hx + 4][hy + 3] = 0
dp[hx + 1][hy] = 0
dp[hx + 3][hy] = 0
dp[hx + 1][hy + 4] = 0
dp[hx + 3][hy + 4] = 0

for i in range(3, mx + 3):
    for j in range(3, my + 3):
        if dp[i][j]:
            dp[i][j] = dp[i - 1][j] + dp[i][j - 1]

print(dp[mx + 2][my + 2])
